import axios from 'axios'
export const getBanner = async () => {
  return axios({
    url: 'http://182.92.156.134:8081/swipers'
  })
}
export const getClass = async ()=>{
  return axios({
    url:'http://localhost:3000/classes?_sort=views&_order=desc&_start=0&_limit=4'
  })
}
export const getArticle = async ()=>{
  return axios({
    url:'http://localhost:3000/articles?_limit=4'
  })
}
export const getHotArticle = async ()=>{
  return axios({
    url:'http://localhost:3000/articles?_start=0&_limit=2'
  })
}

export const searchClass = async (params)=>{
  return axios({
    url:'http://localhost:3000/classes?q='+params
  })
}